import React,{useEffect, useState} from 'react';
import { CloseOutlined } from "@ant-design/icons"

const Advert = () => {
    const [isClose1,setClose1] = useState(false)
    const [isClose2,setClose2] = useState(false)
    return (
        <div className='advert'>
            <div className={isClose1 ?  "advert-img1" :'advert-img'}>
                <CloseOutlined onClick={()=>{setClose1(!isClose1)}}/>
                <a href='https://juejin.cn/book/7039174186522116131?utm_source=web2&utm_medium=&utm_campaign=book_Go_20220413'>
                <img src="https://p1-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/fe53f3e0336944fabc6af4b1d4400965~tplv-k3u1fbpfcp-no-mark:480:400:0:0.awebp?"></img>
                </a>
            </div>
            <div className={ isClose2 ? 'advert-img1': 'advert-img' } >
                <CloseOutlined onClick={()=>{setClose2(!isClose2)}}/>
                <a href="https://juejin.cn/user/center/welfare">
                <img src="https://p6-juejin.byteimg.com/tos-cn-i-k3u1fbpfcp/c5109646b16147848ccfda42be6d98ab~tplv-k3u1fbpfcp-no-mark:480:400:0:0.awebp?" />
                </a>
            </div>
        </div>
    )
}

export default Advert